<template>
  <div class="side-box">
    <!-- <div class="j lt"></div>
    <div class="j rt"></div>
    <div class="j lb"></div>
    <div class="j rb"></div> -->

    <div class="title" v-if="boxTitle">
      <div class="icon">
        <slot name="icon">
          <img src="@/assets/images/box/machine.svg" alt="" />
        </slot>
      </div>
      <div class="text">
        <span> {{ boxTitle }}</span>
      </div>
    </div>
    <div class="body">
      <slot></slot>
    </div>
  </div>
</template>

<script setup name="BoxSide">
import { useSlots } from "vue";

defineProps({
  boxTitle: {
    type: String,
    default: "",
  },
  isMore: {
    type: Boolean,
    default: false,
  },
  isConfig: {
    type: Boolean,
    default: true,
  },
});

const slots = useSlots();
</script>
<style scoped lang="scss">
.side-box {
  width: 100%;
  height: 100%;
  // background: rgba(255, 255, 255, 0.15);
  // background-color: rgba(0, 0, 0, 0.15);
  position: relative;
  .j {
    position: absolute;
    width: 20px;
    height: 20px;
  }
  .lt {
    top: 0;
    left: 0;
    border-left: 3px solid #06e3f3;
    border-top: 3px solid #06e3f3;
  }
  .rt {
    top: 0;
    right: 0;
    border-right: 3px solid #06e3f3;
    border-top: 3px solid #06e3f3;
  }
  .lb {
    bottom: 0;
    left: 0;
    border-left: 3px solid #06e3f3;
    border-bottom: 3px solid #06e3f3;
  }
  .rb {
    bottom: 0;
    right: 0;
    border-right: 3px solid #06e3f3;
    border-bottom: 3px solid #06e3f3;
  }
  .title {
    width: 100%;
    padding-left: 10px;
    // color: #fff;
    color: #06e3f3;
    text-align: left;
    display: flex;
    height: 30px;
    align-items: center;
    background: url("@/assets/images/box/title-box.png");
    background-size: 100% 100%;
    :deep(.icon) {
      width: 20px;
      height: 20px;
      margin-right: 10px;
      position: relative;
      img {
        position: absolute;
        width: 100%;
        height: 100%;
      }
    }
    .text {
      > span {
        font-weight: 600;
        font-size: 16px;
      }
    }
    .jt {
      display: inline-block;
      width: 0;
      height: 0;
      border: 7px solid transparent;
      border-left: 7px solid #2cbeff;
    }
  }
  .body {
    width: 100%;
    height: calc(100% - 30px);
    padding: 5px 0;
  }
}
</style>
